import django_filters
from .models import *

class RouterFilter(django_filters.rest_framework.FilterSet):
    """过滤类"""

    title = django_filters.CharFilter(lookup_expr='icontains')
    name = django_filters.CharFilter(lookup_expr='icontains')
    path = django_filters.CharFilter(lookup_expr='icontains')
    component = django_filters.CharFilter(lookup_expr='icontains')

    class Meta:
        model = Router
        fields = '__all__'